/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Diana
 */
@Entity
@Table(name = "detallenomina", catalog = "nomina", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Detallenomina.findAll", query = "SELECT d FROM Detallenomina d"),
    @NamedQuery(name = "Detallenomina.findByIddetallenomina", query = "SELECT d FROM Detallenomina d WHERE d.iddetallenomina = :iddetallenomina"),
    @NamedQuery(name = "Detallenomina.findByAuxTransporte", query = "SELECT d FROM Detallenomina d WHERE d.auxTransporte = :auxTransporte"),
    @NamedQuery(name = "Detallenomina.findBySubAlimenticio", query = "SELECT d FROM Detallenomina d WHERE d.subAlimenticio = :subAlimenticio"),
    @NamedQuery(name = "Detallenomina.findBySalud", query = "SELECT d FROM Detallenomina d WHERE d.salud = :salud"),
    @NamedQuery(name = "Detallenomina.findByPension", query = "SELECT d FROM Detallenomina d WHERE d.pension = :pension"),
    @NamedQuery(name = "Detallenomina.findByFsp", query = "SELECT d FROM Detallenomina d WHERE d.fsp = :fsp"),
    @NamedQuery(name = "Detallenomina.findBySueldomes", query = "SELECT d FROM Detallenomina d WHERE d.sueldomes = :sueldomes"),
    @NamedQuery(name = "Detallenomina.findByRetefuente", query = "SELECT d FROM Detallenomina d WHERE d.retefuente = :retefuente"),
    @NamedQuery(name = "Detallenomina.findByPrimaNavidad", query = "SELECT d FROM Detallenomina d WHERE d.primaNavidad = :primaNavidad"),
    @NamedQuery(name = "Detallenomina.findByTotaldevengado", query = "SELECT d FROM Detallenomina d WHERE d.totaldevengado = :totaldevengado"),
    @NamedQuery(name = "Detallenomina.findByDiastrabajados", query = "SELECT d FROM Detallenomina d WHERE d.diastrabajados = :diastrabajados"),
    @NamedQuery(name = "Detallenomina.findByDiasincapacidad", query = "SELECT d FROM Detallenomina d WHERE d.diasincapacidad = :diasincapacidad"),
    @NamedQuery(name = "Detallenomina.findByFondoempleado", query = "SELECT d FROM Detallenomina d WHERE d.fondoempleado = :fondoempleado"),
    @NamedQuery(name = "Detallenomina.findByOtrospagare", query = "SELECT d FROM Detallenomina d WHERE d.otrospagare = :otrospagare"),
    @NamedQuery(name = "Detallenomina.findByAmi", query = "SELECT d FROM Detallenomina d WHERE d.ami = :ami"),
    @NamedQuery(name = "Detallenomina.findByRecordar", query = "SELECT d FROM Detallenomina d WHERE d.recordar = :recordar"),
    @NamedQuery(name = "Detallenomina.findBySegurosestado", query = "SELECT d FROM Detallenomina d WHERE d.segurosestado = :segurosestado"),
    @NamedQuery(name = "Detallenomina.findBySegurosbolivar", query = "SELECT d FROM Detallenomina d WHERE d.segurosbolivar = :segurosbolivar"),
    @NamedQuery(name = "Detallenomina.findByIncapacidadLicencia", query = "SELECT d FROM Detallenomina d WHERE d.incapacidadLicencia = :incapacidadLicencia")})
public class Detallenomina implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "iddetallenomina")
    private Integer iddetallenomina;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "aux_transporte")
    private Float auxTransporte;
    @Column(name = "sub_alimenticio")
    private Float subAlimenticio;
    @Column(name = "salud")
    private Float salud;
    @Column(name = "pension")
    private Float pension;
    @Column(name = "fsp")
    private Float fsp;
    @Column(name = "sueldomes")
    private Float sueldomes;
    @Column(name = "retefuente")
    private Float retefuente;
    @Column(name = "prima_navidad")
    private Float primaNavidad;
    @Column(name = "totaldevengado")
    private Float totaldevengado;
    @Column(name = "diastrabajados")
    private Integer diastrabajados;
    @Column(name = "diasincapacidad")
    private Integer diasincapacidad;
    @Column(name = "fondoempleado")
    private Float fondoempleado;
    @Column(name = "otrospagare")
    private Float otrospagare;
    @Column(name = "ami")
    private Float ami;
    @Column(name = "recordar")
    private Float recordar;
    @Column(name = "segurosestado")
    private Float segurosestado;
    @Column(name = "segurosbolivar")
    private Float segurosbolivar;
    @Column(name = "incapacidad_licencia")
    private Float incapacidadLicencia;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "detallenominaIddetallenomina")
    private List<Libranza> libranzaList;
    @JoinColumn(name = "empleado_idempleado", referencedColumnName = "idempleado")
    @ManyToOne(optional = false)
    private Empleado empleadoIdempleado;
    @JoinColumn(name = "nomina_idnomina", referencedColumnName = "idnomina")
    @ManyToOne(optional = false)
    private Nomina nominaIdnomina;

    public Detallenomina() {
    }

    public Detallenomina(Integer iddetallenomina) {
        this.iddetallenomina = iddetallenomina;
    }

    public Integer getIddetallenomina() {
        return iddetallenomina;
    }

    public void setIddetallenomina(Integer iddetallenomina) {
        this.iddetallenomina = iddetallenomina;
    }

    public Float getAuxTransporte() {
        return auxTransporte;
    }

    public void setAuxTransporte(Float auxTransporte) {
        this.auxTransporte = auxTransporte;
    }

    public Float getSubAlimenticio() {
        return subAlimenticio;
    }

    public void setSubAlimenticio(Float subAlimenticio) {
        this.subAlimenticio = subAlimenticio;
    }

    public Float getSalud() {
        return salud;
    }

    public void setSalud(Float salud) {
        this.salud = salud;
    }

    public Float getPension() {
        return pension;
    }

    public void setPension(Float pension) {
        this.pension = pension;
    }

    public Float getFsp() {
        return fsp;
    }

    public void setFsp(Float fsp) {
        this.fsp = fsp;
    }

    public Float getSueldomes() {
        return sueldomes;
    }

    public void setSueldomes(Float sueldomes) {
        this.sueldomes = sueldomes;
    }

    public Float getRetefuente() {
        return retefuente;
    }

    public void setRetefuente(Float retefuente) {
        this.retefuente = retefuente;
    }

    public Float getPrimaNavidad() {
        return primaNavidad;
    }

    public void setPrimaNavidad(Float primaNavidad) {
        this.primaNavidad = primaNavidad;
    }

    public Float getTotaldevengado() {
        return totaldevengado;
    }

    public void setTotaldevengado(Float totaldevengado) {
        this.totaldevengado = totaldevengado;
    }

    public Integer getDiastrabajados() {
        return diastrabajados;
    }

    public void setDiastrabajados(Integer diastrabajados) {
        this.diastrabajados = diastrabajados;
    }

    public Integer getDiasincapacidad() {
        return diasincapacidad;
    }

    public void setDiasincapacidad(Integer diasincapacidad) {
        this.diasincapacidad = diasincapacidad;
    }

    public Float getFondoempleado() {
        return fondoempleado;
    }

    public void setFondoempleado(Float fondoempleado) {
        this.fondoempleado = fondoempleado;
    }

    public Float getOtrospagare() {
        return otrospagare;
    }

    public void setOtrospagare(Float otrospagare) {
        this.otrospagare = otrospagare;
    }

    public Float getAmi() {
        return ami;
    }

    public void setAmi(Float ami) {
        this.ami = ami;
    }

    public Float getRecordar() {
        return recordar;
    }

    public void setRecordar(Float recordar) {
        this.recordar = recordar;
    }

    public Float getSegurosestado() {
        return segurosestado;
    }

    public void setSegurosestado(Float segurosestado) {
        this.segurosestado = segurosestado;
    }

    public Float getSegurosbolivar() {
        return segurosbolivar;
    }

    public void setSegurosbolivar(Float segurosbolivar) {
        this.segurosbolivar = segurosbolivar;
    }

    public Float getIncapacidadLicencia() {
        return incapacidadLicencia;
    }

    public void setIncapacidadLicencia(Float incapacidadLicencia) {
        this.incapacidadLicencia = incapacidadLicencia;
    }

    @XmlTransient
    public List<Libranza> getLibranzaList() {
        return libranzaList;
    }

    public void setLibranzaList(List<Libranza> libranzaList) {
        this.libranzaList = libranzaList;
    }

    public Empleado getEmpleadoIdempleado() {
        return empleadoIdempleado;
    }

    public void setEmpleadoIdempleado(Empleado empleadoIdempleado) {
        this.empleadoIdempleado = empleadoIdempleado;
    }

    public Nomina getNominaIdnomina() {
        return nominaIdnomina;
    }

    public void setNominaIdnomina(Nomina nominaIdnomina) {
        this.nominaIdnomina = nominaIdnomina;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (iddetallenomina != null ? iddetallenomina.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Detallenomina)) {
            return false;
        }
        Detallenomina other = (Detallenomina) object;
        if ((this.iddetallenomina == null && other.iddetallenomina != null) || (this.iddetallenomina != null && !this.iddetallenomina.equals(other.iddetallenomina))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "modelo.Detallenomina[ iddetallenomina=" + iddetallenomina + " ]";
    }
    
}
